<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <%@ include file="/WEB-INF/views/include/head.jsp"%> 
        <link rel="stylesheet" href="${ctxStatic}/css/layerSm.css">
        <script>
            $(document).ready(function(){
                $(".rtname").each(function(){
                    var divH = $(this).height();
                    if(divH > 40) {
                        $(this).addClass('textOver')
                    };
                });
                
            });
            function delShop(){
                $.post("${ctx}/sys/shop/delete?id=${shop.id}",'',function(result){
                    tipParent(result.message);
                    if(result.statusCode==STATUSCODEOK){
                        window.parent.frames[0].location.reload();
                        closeWin(); 
                    }
                },'json');
            }
            $(function(){
                $(".tabBox ul li").each(function(){
                    var index=$(this).index();
                    $(".tabBox ul li").eq(0).addClass("active");
                    $(this).click(function(){
                        $(this).addClass("active").siblings().removeClass("active");
                        $(".tabBoxSm > .tabBox").eq(index).stop(true).show().siblings().stop(true).hide();
                    });
                })

            })
        </script>
    </head>
    <body>
    <!--头部-->
        <div class="myshop clearfix">
            <p class="myshoptop fl"><spring:message code="shop_showShop"/></p>
            <div class="fr">
                <div class="topBtn" onclick="popup('935px','550px','${ctx}/sys/shop/form?id=${shop.id}');closeWin()">
                    <img src="${ctxStatic}/images/btn-bj.png">
                </div>
                <div class="topBtn" onclick="del(delShop)">
                    <img src="${ctxStatic}/images/btn-sc.png">
                </div>
                <div class="topBtnClose" onclick="closeWin()">
                    <img src="${ctxStatic}/images/btn-close.png">
                </div>
            </div>
        </div>
        <div class="middle ">
            <div class="tabBox">
                <ul class="clearfix">
                    <li class="active"><spring:message code="shop_information"/></li>
                    <li><spring:message code="shop_management"/></li>
                </ul>
            </div>
            <c:set value="<%=ResourcesUtil.getConfig(\"shop_styleCategory\")%>" var="shopStyleCategory" />
             <div class="tabBoxSm">
                <div class="tabBox">
                    <div class="myshop_middle">
                        <div class="data clearfix">
                            <div class="ch fl">
                                <p class="data_id_list"><spring:message code="shop_shopName"/>：</p>
                                <p class="fl rtname ">${shop.shopName}</p>
                            </div>
                            <div class="ch fr">
                                <p class="data_id_list"><spring:message code="shop_contacts"/>：</p>
                                <p class="fl rtname ">${shop.contactPerson}</p>
                            </div>
                        </div>
                        <div class="data clearfix">
                            <div class="ch fl">
                                <p class="data_id_list"><spring:message code="shop_hostCountry"/>：</p>
                                <p class="fl rtname ">${fns:getDictName(shop.shopCountry)}</p>
                            </div>
                            <div class="ch fr">
                                <p class="data_id_list"><spring:message code="shop_contactNumber"/>：</p>
                                <p class="fl rtname ">${shop.contactPhone}</p>
                            </div>
                        </div>
                        <div class="data clearfix">
                            <div class="ch fl">
                                <div class="ch data clearfix">
                                    <p class="data_id_list"><spring:message code="shop_region"/>：</p>
                                    <p class="fl rtname ">${fns:getDictName(shop.shopCity)}</p>
                                </div>
                                <div class=" clearfix">
                                    <p class="data_id_list"><spring:message code="shop_address"/>：</p>
                                    <p class="fl rtname " data-toggle="tooltip" title="${shop.shopAddress}">${shop.shopAddress}</p>
                                </div>
                            </div>
                            <div class="ch fr">
                                <div class="data clearfix">
                                    <p class="data_id_list"><spring:message code="shop_fax"/>：</p>
                                    <p class="fl rtname ">${shop.contactFax}</p>
                                </div>
                                <div class="clearfix">
                                    <p class="data_id_list"><spring:message code="shop_mailbox"/>：</p>
                                    <p class="fl rtname ">${shop.contactEmail}</p>
                                </div>
                            </div>
                        </div>
                        <div class="data clearfix">
                            <div class="ch fl clearfix">
                                <div class="data clearfix">
                                    <p class="data_id_list"><spring:message code="shop_shopProfile"/>：</p>
                                    <p class="fl rtname" style="width: 260px;"  data-toggle="tooltip" title="${shop.shopDiscribe}">${shop.shopDiscribe}</p>
                                </div>
                                <div class="data clearfix ">
                                    <p class="data_id_list"><spring:message code="shop_bankAccountNO"/>：</p>
                                    <p class="fl rtname ">${shop.bankAccountNo}</p>
                                </div>
                                <div class="data clearfix">
                                    <p class="data_id_list"><spring:message code="shop_bankAccount"/>：</p>
                                    <p class="fl rtname ">${shop.bankName}</p>
                                </div>
                                <div class="clearfix">
                                    <p class="data_id_list"><spring:message code="shop_managementStyle"/>：</p>
                                    <p class="fl rtname ">
                                        <c:forEach items="${fns:getDictList(shopStyleCategory)}" var="style">
                                            <c:forEach items="${shopStyleSelectList}" var="shopStyle" >
                                                <c:if test="${fn:split(shopStyle.itemId,'-')[1] eq style.itemValue}">${style.itemName}</c:if>
                                            </c:forEach>
                                        </c:forEach>
                                    </p>
                                </div>
                            </div>
                            <div class="ch fr clearfix">
                                <div class="ch_top clearfix">
                                    <p class="data_id_list"><spring:message code="shop_shopLogo"/>：</p>
                                    <img src="${shop.shopLogo}" width="160" height="160"  class="tableImg">
                                    <img src="${shop.shopLogo}" width='160' height='160' class="posImg posImg2">
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="tabBox none">
                    <div class="myshop_middle">
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_surname"/>：</p>
                                <p class="rtname fl">${user.firstName}</p>
                            </div>
                            <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_contactNumber"/>：</p>
                                <p class="rtname fl">${user.telNo}</p>
                            </div>
                        </div>
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_name"/>：</p>
                                <p class="rtname fl">${user.lastName}</p>
                            </div>
                            <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_logonFax"/>：</p>
                                <p class="rtname fl">${user.faxNo}</p>
                            </div>
                        </div>
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_loginName"/>：</p>
                                <p class="rtname fl">${user.loginName}</p>
                            </div>
                            <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_email"/>：</p>
                                <p class="rtname fl">${user.email}</p>
                            </div>
                        </div>
<!--                         <div class="data clearfix"> -->
<!--                             <div class="ch list fl"> -->
<%--                                 <p class="data_id_list"><spring:message code="common_country"/>：</p> --%>
<%--                                 <p class="rtname fl">${fns:getDictName(user.country)}</p>  --%>
<!--                             </div> -->
<!--                               <div class="ch list fr"> -->
<%--                                 <p class="data_id_list"><spring:message code="common_city"/>：</p> --%>
<%--                                 <p class="rtname fl">${fns:getDictName(user.city)}</p>  --%>
<!--                             </div> -->
<!--                         </div> -->
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_sex"/>：</p>
                                <p class="rtname fl">
                                    ${fns:getDictName(user.sex)}
                                </p>
                             </div>   
                            <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_personnelrole"/>：</p>
                                <p class="rtname fl">${user.role.roleName}</p>
                            </div>
                          
                        </div>
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_dateofbirth"/>：</p>
                                <p class="rtname fl">
                                   <fmt:formatDate value="${user.birthDate}" pattern="yyyy-MM-dd" ></fmt:formatDate>
                                </p>
                             </div>   
                             <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_iphone"/>：</p>
                                <p class="rtname fl">${user.mobile}</p>
                            </div>
                            
                        </div>
                        <div class="data clearfix">
                            <div class="ch list fl">
                                <p class="data_id_list"><spring:message code="shop_detailedAddress"/>：</p>
                                <p class="rtname fl"  data-toggle="tooltip" title="${user.address}">${user.address}</p>
                            </div>
                            <div class="ch list fr">
                                <p class="data_id_list"><spring:message code="shop_remarks"/>：</p>
                                <p class="rtname fl"  data-toggle="tooltip" title="${user.remarks}">${user.remarks}</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <script src="${ctxStatic}/layer/layerStyle.js"></script>
        <script>
            var windowH = window.innerHeight
                ||document.documentElement.clientHeight
                ||document.body.clientHeight
            $('.middle').css('height',windowH - 40);
        </script>
                <script>
        $(".tableImg").hover(function(){
            var thisImg = $(this).next('.posImg2');
            var thisW = $(this).width();
            var thisH = $(this).height();
            thisImg.css({
                width:thisW*2 + "px",
                height:thisH*2 + "px"
            });
            var thisImgW = thisImg.width();
            var thisImgH = thisImg.height();
            var thisImgTop = $(this).offset().top;
            var thisImgLeft = $(this).offset().left;
            thisImg.css({
                top:thisImgTop - (thisImgH - thisH)/2 + "px",
                left:thisImgLeft - (thisImgW - thisW)/2 + "px",
            })
            
            thisImg.show()
        });

        $(".posImg2").hover(function(){
//            移入
        },function(){
            $(this).hide()
        });
        </script>
    </body>
</html>